using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO{
	/********************************BEGIN PhanCongGiangDayDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:07/10/2010 39:07:23</para>
	/// <para>Class Name: PhanCongGiangDayDAO</para>
	/// <para>Description: Class access to table PhanCongGiangDay in database. Class for coder code here</para>
	///</summary>

	
	public partial class PhanCongGiangDayDAO{
        public DataSet SelectAllDSWithMonHocByGiangVien(int GiaoVien_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText =
                                @"SELECT    GiaoVien.MaGiaoVien,GiaoVien.HoTenGiaoVien,MonHoc.MonHoc_ID, MonHoc.MaMonHoc, MonHoc.TenMonHoc, PhanCongGiangDay.SucGiang, 
                                     PhanCongGiangDay.GiaoVien_ID, PhanCongGiangDay.PhanCongGiangDay_ID
                FROM          PhanCongGiangDay LEFT JOIN
                                     MonHoc ON PhanCongGiangDay.MonHoc_ID = MonHoc.MonHoc_ID 
                              LEFT JOIN GiaoVien ON PhanCongGiangDay.GiaoVien_ID=GiaoVien.GiaoVien_ID
                    ";
            if (GiaoVien_ID > 0)
            {
                cmd.CommandText += @"WHERE PhanCongGiangDay.GiaoVien_ID=@GiaoVien_ID";
                this.CreateCommandParameter(cmd, "@GiaoVien_ID", GiaoVien_ID);
            }
            return this.SelectDS(cmd);
        }

	}
	/*****************************************************************************************************/
	/**********************************END PhanCongGiangDayDAO*****************************************/
	/*****************************************************************************************************/
}

